using UnityEngine;
using System.Collections;
using System;

public class BoolList
{
    ArrayList indizes = new ArrayList();
    ArrayList values = new ArrayList();
    // Use this for initialization
    public void Add(string index, bool value)
    {
        if (indizes.Contains(index))
        {
            throw new Exception("Index allready set!");
        }
        indizes.Add(index);
        values.Add(value);
    }
    public void Set(string index, bool value)
    {
        int i = indizes.IndexOf(index);
        values[i] = value;
    }
    public void RemoveAt(string index)
    {
        int i = indizes.IndexOf(index);
        indizes.RemoveAt(i);
        values.RemoveAt(i);
    }
    public bool AllReady()
    {
        foreach (bool value in values)
        {
            if (!(bool)value)
            {
                return false;
            }
        }
        return true;
    }
}
